from rest_framework import serializers
from .models import *

class ClientSerializers(serializers.ModelSerializer):
    """
    客户端
    """
    class Meta:
        model = Client
        fields = ['name']

class ClientRankingSerializers(serializers.ModelSerializer):
    """
    客户端数据
    """
    client = ClientSerializers()['name']

    class Meta:
        model = ClientRanking
        fields = ['client', 'fraction']



